{#
/**
 * Global container for the answer
 *
 * @var $q_table_id_HTML
 * @var $classes
 * @var $extraclass
 * @var $num_class
 * @var $totals_class
 * @var $answerwidth
 * @var $cellwidth
 * @var $labelans
 * @var $right_exists
 * @var $showGrandTotal
 * @var $showtotals,
 * @var $row_head,
 * @var $total,
 * @var $q_table_id
 * @var $radix
 * @var $name
 * @var $sRows
 */
#}

<!-- Multi Text -->

<!-- answer -->
<div role="group" aria-labelledby="ls-question-text-{{ basename }}">
    <table {{ q_table_id_HTML }} class="{{ coreClass }} {{ extraclass }} table table-bordered table-hover {{ totals_class }}" aria-labelledby="ls-question-text-{{ basename }}">
        <colgroup class="col-responses">

            <!-- Column for answer label -->
            <col class="answertext" style='width: {{ answerwidth }}%;'/>

            <!-- columns for answers -->
            {% for i, ld in labelans %}
                <col class="{# {# TODO: array2 alternation #} {# classes #}" style='width: {{ cellwidth }}%;' />
            {% endfor %}

            <!-- columns for right -->
            {% if right_exists %}
                <col class="answertextright {# TODO: array2 alternation #}" style='width: {{ cellwidth }}%;' />
            {% endif %}

            <!-- columns for Grand Total -->
            {% if showGrandTotal %}
                <col class="grandtotal {# TODO: array2 alternation #}" style='width: {{ cellwidth }}%;' />
            {% endif %}
        </colgroup>

        <thead>
            <tr class="ls-heading ls-header">
                <td>
                    &nbsp;
                </td>
                {% for code, text in labelans %}
                    <th id="answertext{{ basename }}_{{ code }}" class="answertext control-label" role="columnheader">
                        {{ processString(text) }}
                    </th>
                {% endfor %}

                {% if right_exists %}
                    <td>&nbsp;</td>
                {% endif %}

                {{ col_head }}
            </tr>
        </thead>

        <tbody>

                {# Defined in answer_row view #}
                {{ sRows }}

            {% if showtotals %}
                <tr class="total">
                    {{ row_head }}
                    {{ total }}
                </tr>
            {% endif %}
        </tbody>
    </table>
</div>
<!-- end of answer -->

{% if (showGrandTotal == true) or (showtotals == true) %}
    {{ registerPackage('question-array-numeric') }}
{% endif %}
